import instance from "@/config/axiosConfig.js";

const role = {
    queryRoleList: (params) => {
        return instance.get("/sys/role/list", {params}).then(res => {
            return res.data;
        });
    },
    editRole: (data) => {
        return instance.post("/sys/role/edit", data).then(res => {
            return res.data;
        });
    },
    deleteRole: (id, menuId) => {
        return instance.delete(`/sys/role/${id}`, {params: {menuId}}).then(res => {
            return res.data;
        });
    },
}

export default role;
